using System;
using System.Diagnostics.Contracts;
using System.IO;

namespace OpenWaves.ImageTransformations
{
    [ContractClass(typeof(ImageTransformationServiceContract))]
    [DefaultImplementation(typeof(GdiImageTransformationService))]
    public interface IImageTransformationService
    {
        void TransformImage(Stream input, Stream output, ImageFormat outputFormat, IImageTransformation transformation);
    }

    [ContractClassFor(typeof(IImageTransformationService))]
    abstract class ImageTransformationServiceContract : IImageTransformationService
    {
        public void TransformImage(Stream input, Stream output, ImageFormat outputFormat, IImageTransformation transformation)
        {
            Contract.Requires<ArgumentNullException>(input != null);
            Contract.Requires<ArgumentNullException>(output != null);
            Contract.Requires<ArgumentNullException>(transformation != null);

            throw new NotImplementedException();
        }
    }
}